/* const Koa = require('koa')
const app = new Koa()

app.use(ctx => {
    ctx.body = 'Hello Koa'
})

app.listen(3000) */

const koa = require('koa')
const { userAgent } = require('koa-useragent')
const log = require('./log')

const app = new koa()
app.use(userAgent)
app.use(log({
    format: text => `==== ${text} ====`
}))

/* app.use(async (ctx, next) => {
    console.log(require('util').inspect(ctx.userAgent));
}) */

app.listen(3000);